#include <iostream>
using namespace std;

// 已知
long long n;
// 未知

int main()
{
    cin >> n;
    if (n == 1)
    {
        cout << -1 << endl;
        return 0;
    }
    for (long long i = 1; i <= 1000000; i++)
    {
        if (n % i == 0)
        {
            long long b = n / i;
            long long l = 1, r = 1e9, mid;
            while (l <= r)
            {
                mid = (l + r) / 2;
                long long x = mid + i, y = mid;
                long long p = x * x + x * y + y * y;
                if (p == b)
                {
                    cout << x << ' ' << y;
                    return 0;
                }
                else if (p > b)
                {
                    r = mid - 1;
                }
                else
                {
                    l = mid + 1;
                }
            }
        }
    }
    cout << -1 << endl;
    return 0;
}